package gLib::SMC;

## ----------------------------------------------------
## Title :			Generic Stonesoft SMC Class
## Description :	Provide generic function to manipulate Stonesoft SMC API
## Date :			2013-07-11
## Version :		0.1
## Author :			@TiTom
## ----------------------------------------------------

## ----------------------------------------------------
## Todo List
## ----------------------------------------------------
## - Add Perl Doc comments
## - Validate all functions
## - Insert function from gDebug for debug actions.
## - Add SMC API when available
## ----------------------------------------------------


########################################################
#	Requirements
########################################################
## Required Library
use strict;
use warnings;
use Net::HTTP;
use gLib::SRV;
use gLib:gDebug;

## Class Constructor
sub new {
	my ($class) = @_;

	my $dbst = new gLib::gDebug;
	$dbst->debug(1);
	
	my $server = new gLib::SRV;
	$server->name("SMC Server");

	my $self = {
		IP			=> undef,
		PORT		=> "80",
		NAME		=> "gLib::SMC Instance",
		VERSION		=>	undef,
		AUTH_KEY	=> undef,
		DBST		=> $dbst,
		SRV			=> $server
	};

	bless	$self,$class;
	return	$self;
}

## Function to authenticate client against SMC
## return 1 if OK
## return 0 otherwise
sub auth {
	my ($self) = @_;
	## Define URL to auth
	## Send GET to auth
	my $auth = 1;
	if( $auth == 0 )
	{
		return 0;
	}
	return 1;
}
